package ro.cityprojects.adminloc.dao;

import ro.cityprojects.adminloc.entities.BaseEntity;

import java.io.Serializable;
import java.util.Set;

/**
 * DAO definition of CRUD operations for all the extending classes
 *
 * @author bogdan.solga
 *
 * Date: 14.06.2013, time: 13:45
 */
public interface AbstractRepository<PK extends Serializable, Entity extends BaseEntity> {

    // Create operations
    public void save(Entity entity);

    // Read operations
    public Entity get(PK id);

    public Set<Entity> getAll(String filterName, String filterValue);

    // Update operations
    public void update(Entity entity);

    // Delete operations
    public void delete(PK id);
}
